<?php
/**
 * Created by PhpStorm.
 * User: feng
 * Date: 2016/12/17
 * Time: 上午11:01
 */

defined('BASEPATH') OR exit('No direct script access allowed');

class Test extends CI_Controller
{
    //type 1 普通用户 2 任务专员 3系统管理员
    public function index()
    {
        echo date('Y-m-d H:i:s');
    }

    public function originalAtricleAdd()
    {
//        $user_id = $_REQUEST['user_id'];
//        $article_text = $_REQUEST['article_text'];
//        $title = $_REQUEST['title'];
//        $this->load->model('lyw_original_article_model');
//        $this->lyw_original_article_model->add($user_id, $title, $article_text);
//        $this->load->helper('url');
//        $this->load->view('administrator_task');
    }

    public function t()
    {
        $this->lyw_common_model->shouDongJiSuanJingYan();
    }

    /**
     * 删除线测试
     */
    public function deltext()
    {
        $this->load->model('lyw_proofread_article_model');
        $arr = $this->lyw_proofread_article_model->getOneListInfoById(93, array('article_html'));
//        echo $arr['article_html'];
        preg_match_all('/(?<=<span style="text-decoration: line-through;">)([^<])*(?=<\/span>)/s', '', $out);
        var_dump($out[0]);
//        foreach ($out as $key => $value) {
//            if (is_array($value)) {
//                foreach ($value as $key_2 => $value_2) {
//                    echo $value_2;
//                }
//            } else {
//
//            }
//        }
    }


    public function p()
    {
//        preg_match('/Windows(?=95|98|NT|2000)/s', 'Windows2000', $out);
//        var_dump($out);
        echo date('Y-m-d H:i:s');
    }


}